package com.zzl.finance.data.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 金融机构
 *
 * @author wztsl
 * @date 2021-12-22 16:56:38
 */
@Data
@ApidocModel
public class FinanceInstitutyAddDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @NotBlank(message = "资方名称不能为空")
    @ApidocModelProperty(description = "资方名称")
    private String instinctyName;
    @NotBlank(message = "统一社会信用代码不能为空")
    @ApidocModelProperty(description = "统一社会信用代码")
    private String socialCreditCode;
    @NotBlank(message = "企业电话不能为空")
    @ApidocModelProperty(description = "企业电话")
    private String enterprisePhone;
    @NotNull(message = "资金方类型不能为空")
    @ApidocModelProperty(description = "资金方类型，1：银行，2：保理商")
    private Integer financierType;
    @NotNull(message = "接入方式不能为空")
    @ApidocModelProperty(description = "接入方式，1 是（接口接入） 0 否（平台接入）")
    private Integer accessMode;
    @NotNull(message = "是否允许使用其他银行账户不能为空")
    @ApidocModelProperty(description = "是否允许使用其他银行账户，0：不允许，1：允许")
    private Integer allowOtherAccount;
    @Size(min = 1, message = "融资范围不能为空")
    @ApidocModelProperty(description = "融资范围，选择支持债权所属金融机构范围，多选")
    private List<String> financingScope;
    @Size(min = 1, message = "子产品配置不能为空")
    @ApidocModelProperty(description = "子产品配置")
    private List<FinancialProductAddDto> productAddDtoList;
    @NotBlank(message = "账号不能为空！")
    @ApidocModelProperty(description = "账号")
    private String userAccount;
    @NotBlank(message = "管理员姓名不能为空！")
    @ApidocModelProperty(description = "管理员姓名")
    private String userNameCertification;
    @NotBlank(message = "身份证不能为空！")
    @Pattern(regexp = "(^\\d{18}$)|(^\\d{15}$)", message = "身份证输入不正确！")
    @ApidocModelProperty(description = "身份证")
    private String userCertification;
    @Pattern(regexp = "(^1[0-9]{10}$)", message = "手机号码输入不正确！")
    @NotBlank(message = "手机号码不能为空")
    @ApidocModelProperty(description = "管理员手机号")
    private String userPhone;
}
